<script>
    document.addEventListener('copy', function (event) {
        let clipboardData = event.clipboardData || window.clipboardData;
        if (!clipboardData) {
            return;
        }
        let text = window.getSelection().toString();
        if (text) {
            event.preventDefault();
            clipboardData.setData('text/plain', text + "\n" + {!! \ModStart\Core\Util\SerializeUtil::jsonEncode(modstart_config('CopyAppender_Text')) !!});
        }
    });
</script>
